package cn.minsh.lims.eoms.modules.app.controller.res;

import cn.minsh.lims.eoms.modules.app.dao.PicDao;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.RequiredArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 */
@Data
@ApiModel("保养订单详情")
public class MaintenanceOrderInfoRes {

    @ApiModelProperty("订单id")
    private Long id;
    @ApiModelProperty("订单编号")
    private String code ;
    @ApiModelProperty("工单名称")
    private String name;
    @ApiModelProperty("保养级别：1：一级2：二级")
    private Integer level;
    @ApiModelProperty("保养类型：1自主保养2委外保养")
    private Integer type;
    @ApiModelProperty("供应商id")
    private Long supplierId;
    @ApiModelProperty("保养时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date maintenanceTime;
    @ApiModelProperty("计划保养时间，精准至日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planFixTime;
    @ApiModelProperty("经办人")
    private Long agentId;
    @ApiModelProperty("包含：1未开始、2处理中、3已完成、4已关闭、5已拒绝")
    private Integer status;
    @ApiModelProperty("完成时间")
    private Date completeTime ;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date updateTime;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("当前登录人")
    private Long loginUserId ;
    @ApiModelProperty("保养范围，范围id(Long)列表")
    private List<Long> scopeList ;
    @ApiModelProperty("保养内容，字符串列表")
    private List<String> contentList ;
    @ApiModelProperty("保养提醒，正整数列表")
    private List<Integer> remindList ;

    @ApiModelProperty("保养日志")
    private List<RecordRes> recordResList ;


    @Data
    @ApiModel("保养日志")
    public static class RecordRes{
        @ApiModelProperty("记录id")
        private Long id;
        @ApiModelProperty("操作人")
        private Long operatorId;
        @ApiModelProperty("操作时间")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date operatorTime;
        @ApiModelProperty("操作")
        private String operation;
        @ApiModelProperty("操作说明")
        private String explain;
        @ApiModelProperty("用户id")
        private Long userId ;
    }
}
